home *** CD-ROM | disk | FTP | other *** search
/ PD Collection CD 1 / PD Collection CD 1.iso / textual / tex / files / !tex / TeXsource / beebe / h / gblprocs < prev    next >
Encoding:
Text File  |  1990-05-18  |  11.5 KB  |  585 lines

  1. /* -*-C-*- gblprocs.h */
  2. /*-->gblprocs*/
  3. /**********************************************************************/
  4. /****************************** gblprocs ******************************/
  5. /**********************************************************************/
  6.  
  7. /**********************************************************************/
  8. /*************************  Global Procedures  ************************/
  9. /**********************************************************************/
  10.  
  11. #if    ANSI_PROTOTYPES
  12. void    abortrun(int);
  13. float    actfact(UNSIGN32);
  14. void    alldone(void);
  15.  
  16. #if    ANSI_LIBRARY
  17. #ifdef __STDC__
  18. #include <stdlib.h>
  19. #else
  20. double    atof(const char *);
  21. int    atoi(const char *);
  22. #endif
  23. #else
  24. double    atof(char *);
  25. int    atoi(char *);
  26. #endif /* ANSI_LIBRARY */
  27.  
  28. #if    (BBNBITGRAPH | CANON_A2 | HPJETPLUS | IMPRESS | POSTSCRIPT)
  29. void    bopact();
  30. #endif /* (BBNBITGRAPH | CANON_A2 | HPJETPLUS | IMPRESS | POSTSCRIPT) */
  31.  
  32. #ifdef __STDC__
  33. int chargf(BYTE c, void (*outfcn)());
  34. int charpk(BYTE c, void (*outfcn)());
  35. int charpxl(BYTE c, void (*outfcn)());
  36. #else
  37. int    chargf(BYTE,void(*)());
  38. int    charpk(BYTE,void(*)());
  39. int    charpxl(BYTE,void(*)());
  40. #endif
  41.  
  42. #if    (BBNBITGRAPH | HPJETPLUS | POSTSCRIPT | IMPRESS | CANON_A2)
  43. #else
  44. void    clrbmap(void);
  45. #endif /* (BBNBITGRAPH | HPJETPLUS | POSTSCRIPT | IMPRESS | CANON_A2) */
  46.  
  47. void    clrrow(void);
  48.  
  49. #if    POSTSCRIPT
  50. void    cppsfile(void);
  51. #endif /* POSTSCRIPT */
  52.  
  53. #if    ANSI_LIBRARY
  54. #ifdef __STDC__
  55. #include <time.h>
  56. #else
  57. char*   ctime(const time_t *);
  58. #endif
  59. #else
  60. char*    ctime(long *);
  61. #endif /* ANSI_LIBRARY */
  62.  
  63. char*    cuserid(char *);
  64. void    dbgopen(FILE*, char*, char*);
  65. void    devinit(int, char *[]);
  66. void    devterm(void);
  67.  
  68. #if    (BBNBITGRAPH | HPJETPLUS | POSTSCRIPT | IMPRESS | CANON_A2)
  69. #else
  70. void    dispchar(BYTE);
  71. #endif /* (BBNBITGRAPH | HPJETPLUS | POSTSCRIPT | IMPRESS | CANON_A2) */
  72.  
  73. void    dvifile(int, char *[], char *);
  74. void    dviinit(char *);
  75. void    dviterm(void);
  76.  
  77. #if    POSTSCRIPT
  78. void    emitchar(register BYTE c);
  79. #endif /* POSTSCRIPT */
  80.  
  81. #if    (BBNBITGRAPH | CANON_A2 | HPJETPLUS | POSTSCRIPT)
  82. void    eopact();
  83. #endif /* (BBNBITGRAPH | CANON_A2 | HPJETPLUS | POSTSCRIPT) */
  84.  
  85. void    EXIT(int);
  86. void    fatal(char *);
  87. void    fillrect(COORDINATE, COORDINATE, COORDINATE, COORDINATE);
  88. void    findpost(void);
  89. #ifdef __STDC__
  90. COORDINATE fixpos(register COORDINATE cc, register INT32 c, register float cnvfac);
  91. #else
  92. COORDINATE    fixpos(COORDINATE, INT32, float);
  93. #endif
  94. void    fontfile(char *[MAXFORMATS],char *,char *,int);
  95. BOOLEAN    fontsub(char *,int *,char *,int);
  96.  
  97. #if    ANSI_LIBRARY
  98. #ifdef __STDC__
  99. #include <stdlib.h>
  100. #else
  101. void    free(void *);
  102. #endif
  103. #else
  104. void    free(char *);
  105. #endif /* ANSI_LIBRARY */
  106.  
  107. int    FSEEK(FILE *,long,int);
  108. void    getbmap(void);
  109. #ifdef __STDC__
  110. void getbytes(register FILE *fp, register char *cp, register BYTE n);
  111. #else
  112. void    getbytes(FILE *, char *, BYTE);
  113. #endif
  114.  
  115. #if    ANSI_LIBRARY
  116. char*    GETENV(const char *);
  117. #else
  118. char*    GETENV(char *);
  119. #endif /* ANSI_LIBRARY */
  120.  
  121. void    getfntdf(void);
  122.  
  123. #if    OS_VAXVMS
  124. char*    getjpi(int);
  125. #endif
  126.  
  127. char*    getlogin(void);
  128. void    getpgtab(long);
  129. void    initglob(void);
  130. float    inch(char *);
  131.  
  132. #if    BBNBITGRAPH
  133. void    initterm();
  134. #endif /* BBNBITGRAPH */
  135.  
  136. #if    (CANON_A2 | HPJETPLUS)
  137. #ifdef __STDC__
  138. void loadbmap(register BYTE c);
  139. #else
  140. void    loadbmap(BYTE);
  141. #endif
  142. #endif /* (CANON_A2 | HPJETPLUS) */
  143.  
  144. #ifdef __STDC__
  145. void    loadchar(register BYTE c);
  146. #else
  147. void    loadchar(BYTE);
  148. #endif
  149.  
  150. #if    BBNBITGRAPH
  151. void    loadrast(FILE *, COORDINATE, COORDINATE);
  152. #endif /* BBNBITGRAPH */
  153.  
  154. int    main(int ,char *[]);
  155.  
  156. #if    ANSI_LIBRARY
  157. #ifdef __STDC__
  158. #include <stdlib.h>
  159. #else
  160. void*    malloc(size_t);
  161. #endif
  162. #else
  163. char*    malloc(unsigned);
  164. #endif /* ANSI_LIBRARY */
  165.  
  166. #if    (APPLEIMAGEWRITER | OKIDATA2410)
  167. char    makechar(UNSIGN32 *[],UNSIGN32);
  168. #endif /* (APPLEIMAGEWRITER | OKIDATA2410) */
  169.  
  170. #if    HPJETPLUS
  171. void    makefont(void);
  172. #endif
  173.  
  174. void    movedown(INT32);
  175. void    moveover(INT32);
  176. #ifdef __STDC__ /* testing ... */
  177. void    moveto(COORDINATE x, COORDINATE y);
  178. #else
  179. void    moveto(COORDINATE, COORDINATE);
  180. #endif
  181.  
  182. #if    (BBNBITGRAPH | HPJETPLUS | POSTSCRIPT | IMPRESS | CANON_A2)
  183. void    newfont(void);
  184. #endif
  185.  
  186. #ifdef __STDC__
  187. UNSIGN32
  188. nosignex(register FILE *fp, register BYTE n);
  189. #else
  190. UNSIGN32    nosignex(FILE *,BYTE);
  191. #endif
  192. void    openfont(char *);
  193. void    option(char *);
  194.  
  195. #if    HPLASERJET
  196. void    outline(UNSIGN32 *);
  197. #else
  198. void    outline(char *);
  199. #endif /* HPLASERJET */
  200.  
  201. #if    EPSON
  202. #if    HIRES
  203. void    outpaperfeed(INT16);
  204. #endif /* HIRES */
  205. #endif /* EPSON */
  206.  
  207. #if    HPJETPLUS
  208. #ifdef __STDC__
  209. void outraster(BYTE c, UNSIGN16 yoff);
  210. #else
  211. void    outraster(BYTE,UNSIGN16);
  212. #endif
  213. #endif /* HPJETPLUS */
  214.  
  215. #ifdef __STDC__
  216. void outrow(BYTE c, UNSIGN16 yoff);
  217. #else
  218. void    outrow(BYTE,UNSIGN16);
  219. #endif
  220.  
  221. #if    (BBNBITGRAPH | HPJETPLUS | POSTSCRIPT | IMPRESS | CANON_A2)
  222. #else
  223. void    prtbmap(void);
  224. #endif /* (BBNBITGRAPH | HPJETPLUS | POSTSCRIPT | IMPRESS | CANON_A2) */
  225.  
  226. void    prtpage(long);
  227.  
  228. #if    POSTSCRIPT
  229. char*    putfontname(struct font_entry *);
  230. void    putname(FILE *,struct font_entry *);
  231. #endif /* POSTSCRIPT */
  232.  
  233. #if    BBNBITGRAPH
  234. void    putout(INT16);
  235. #endif /* BBNBITGRAPH */
  236.  
  237. void    readfont(INT32);
  238. int    readgf(void);
  239. int    readpk(void);
  240. void    readpost(void);
  241. int    readpxl(void);
  242. void    reldfont(struct font_entry *);
  243.  
  244. #if    BBNBITGRAPH
  245. void    rsetterm();
  246. #endif /* BBNBITGRAPH */
  247.  
  248. #ifdef __STDC__
  249. COORDINATE rulepxl(register UNSIGN32 number, register float cnvfac);
  250. void setchar(register BYTE c, register BOOLEAN update_h);
  251. #else
  252. COORDINATE    rulepxl(UNSIGN32,float);
  253. void    setchar(BYTE,BOOLEAN);
  254. #endif
  255.  
  256. #if    HPJETPLUS
  257. void    setfont(void);
  258. #endif
  259.  
  260. #if    (HPJETPLUS | POSTSCRIPT | IMPRESS | CANON_A2)
  261. #ifdef __STDC__
  262. void setstr(register BYTE c);
  263. #else
  264. void    setstr(BYTE);
  265. #endif
  266. #endif /* (HPJETPLUS | POSTSCRIPT | IMPRESS | CANON_A2) */
  267.  
  268. void    setfntnm(INT32);
  269. #ifdef __STDC__
  270. void setrule(register UNSIGN32 height, register UNSIGN32 width, register BOOLEAN update_h);
  271. INT32 signex(register FILE *fp, register BYTE n);
  272. #else
  273. void    setrule(UNSIGN32, UNSIGN32, BOOLEAN);
  274. INT32    signex(FILE *,BYTE);
  275. #endif
  276. void    skipfont(INT32);
  277. void    skgfspec(void);
  278. void    skpkspec(void);
  279. void    special(char *);
  280.  
  281. #if    ANSI_LIBRARY
  282. #ifdef __STDC__
  283. #include <string.h>
  284. #else
  285. char*    strcat(char *,const char *);
  286. char*    strchr(const char *,int);
  287. char*    strcpy(char *,const char *);
  288. size_t    strlen(const char *);
  289. int    strncmp(const char *,const char *,size_t);
  290. char*    strncpy(char *,const char *,size_t);
  291. char*    strrchr(const char *,int);
  292. #endif /* __STDC__ */
  293. #else /* NOT ANSI_LIBRARY conformant */
  294. #ifdef __STDC__
  295. #include <string.h>
  296. #else
  297. char*    strcat(char *,char *);
  298. char*    strchr(char *,char);
  299. char*    strcpy(char *,char *);
  300. int    strlen(char *);
  301. int    strncmp(char *,char *,int);
  302. char*    strncpy(char *,char *,int);
  303. char*    strrchr(char *,char);
  304. #endif
  305. #endif /* ANSI_LIBRARY */
  306.  
  307. int    strcm2(char *,char *);
  308. int    strid2(char[],char[]);
  309.  
  310. char*    tctos(void);
  311.  
  312. #if    POSTSCRIPT
  313. #ifdef __STDC__
  314. void textchr(register char c);
  315. #else
  316. void    textchr(char);
  317. #endif
  318. void    textflush();
  319. void    textnum(long);
  320. void    textstr(char *);
  321. #endif /* POSTSCRIPT */
  322.  
  323. #if    ANSI_LIBRARY
  324. #ifdef __STDC__
  325. #include <time.h>
  326. #else
  327. time_t    time(time_t *);
  328. #endif
  329. #else
  330. long    time(long *);
  331. #endif /* ANSI_LIBRARY */
  332.  
  333. #if    BBNBITGRAPH
  334. void    unloadfonts();
  335. #endif
  336.  
  337. void    usage(FILE *);
  338.  
  339. #if    VIRTUAL_FONTS
  340. void    virtfree(FILE *);
  341. #endif
  342.  
  343. void    warning(char *);
  344.  
  345. #if    FASTZERO
  346. void    zerom(UNSIGN32 *,UNSIGN32);
  347. #endif /* FASTZERO */
  348.  
  349. #else /* NOT ANSI_PROTOTYPES */
  350. double    atof();
  351. int    atoi();
  352.  
  353. #if    (BBNBITGRAPH | CANON_A2 | HPJETPLUS | IMPRESS | POSTSCRIPT)
  354. void    bopact();
  355. #endif /* (BBNBITGRAPH | CANON_A2 | HPJETPLUS | IMPRESS | POSTSCRIPT) */
  356.  
  357. char*    cuserid();
  358. char*    ctime();
  359. void    EXIT();
  360. void    free();
  361. int    FSEEK();
  362. long    FTELL();
  363. char*    GETENV();
  364.  
  365. #if    OS_VAXVMS
  366. char*    getjpi();
  367. #endif
  368.  
  369. char*    getlogin();
  370. char*    malloc();
  371.  
  372. #if    (IBM_PC_WIZARD | KCC_20 | OS_VAXVMS | OS_RISCOS)
  373. /* stdio.h declares sprintf(); */
  374. #else
  375. char*    sprintf();        /* Berkeley 4.1 BSD style */
  376. #endif /* (IBM_PC_WIZARD | KCC_20 | OS_VAXVMS) */
  377.  
  378. #ifdef __STDC__
  379. #include <string.h>
  380. #else
  381. char*    strcpy();
  382. char*    strcat();
  383. char*    strchr();        /* private version of this 4.2BSD function */
  384. char*    strrchr();        /* private version of this 4.2BSD function */
  385. int    strcmp();
  386. int    strncmp();
  387. char*    strncpy();
  388. #endif
  389. int    strcm2();        /* local addition (used by inch()) */
  390. int    strid2();        /* local addition (used by initglob()) */
  391.  
  392. long    time();
  393.  
  394. /***********************************************************************
  395. Note: Global procedures  are declared here  in alphabetical order,  with
  396. those which do not  return values typed "void".   Their bodies occur  in
  397. alphabetical order following the main()  procedure, usually in the  form
  398. of "#include" statements.   The names  are kept  unique in  the first  6
  399. characters for portability.
  400. ***********************************************************************/
  401.  
  402. void    abortrun();
  403. float    actfact();
  404. void    alldone();
  405. FILE*    FOPEN();
  406.  
  407. int    chargf();
  408. int    charpk();
  409. int    charpxl();
  410. void    clrrow();
  411.  
  412. #if    POSTSCRIPT
  413. void    cppsfile();
  414. #endif /* POSTSCRIPT */
  415.  
  416. void    dbgopen();
  417. void    devinit();
  418. void    devterm();
  419.  
  420. #if    (BBNBITGRAPH | HPJETPLUS | POSTSCRIPT | IMPRESS | CANON_A2)
  421. #else /* NOT (BBNBITGRAPH | HPJETPLUS | POSTSCRIPT | IMPRESS | CANON_A2) */
  422. void    clrbmap();
  423. void    dispchar();
  424. #endif /* (BBNBITGRAPH | HPJETPLUS | POSTSCRIPT | IMPRESS | CANON_A2) */
  425.  
  426. void    dvifile();
  427. void    dviinit();
  428. void    dviterm();
  429.  
  430. #if    POSTSCRIPT
  431. void    emitchar();
  432. #endif /* POSTSCRIPT */
  433.  
  434. #if    (BBNBITGRAPH | CANON_A2 | HPJETPLUS | POSTSCRIPT)
  435. void    eopact();
  436. #endif /* (BBNBITGRAPH | CANON_A2 | HPJETPLUS | POSTSCRIPT) */
  437.  
  438. void    fatal();
  439. void    fillrect();
  440. void    findpost();
  441. void    fontfile();
  442. BOOLEAN    fontsub();
  443. COORDINATE    fixpos();
  444. void    getbmap();
  445. void    getbytes();
  446. void    getfntdf();
  447. void    getpgtab();
  448.  
  449. #if    BBNBITGRAPH
  450. void    gotint();
  451. #endif /* BBNBITGRAPH */
  452.  
  453. float    inch();
  454. void    initglob();
  455.  
  456. #if    BBNBITGRAPH
  457. void    initterm();
  458. #endif /* BBNBITGRAPH */
  459.  
  460. #if    (CANON_A2 | HPJETPLUS)
  461. void    loadbmap();
  462. #endif /* (CANON_A2 | HPJETPLUS) */
  463.  
  464. void    loadchar();
  465.  
  466. #if    BBNBITGRAPH
  467. void    loadrast();
  468. #endif /* BBNBITGRAPH */
  469.  
  470. int    main();
  471.  
  472. #if    APPLEIMAGEWRITER
  473. char    makechar();
  474. #endif /* APPLEIMAGEWRITER */
  475.  
  476. #if    OKIDATA2410
  477. char    makechar();
  478. #endif /* OKIDATA2410 */
  479.  
  480. #if    HPJETPLUS
  481. void    makefont();
  482. #endif
  483.  
  484. void    movedown();
  485. void    moveover();
  486. void    moveto();
  487.  
  488. #if    (BBNBITGRAPH | HPJETPLUS | POSTSCRIPT | IMPRESS | CANON_A2)
  489. void    newfont();
  490. #endif
  491.  
  492. UNSIGN32    nosignex();
  493.  
  494. #if    BBNBITGRAPH
  495. #else /* NOT BBNBITGRAPH */
  496. void    outline();
  497. #endif /* BBNBITGRAPH */
  498.  
  499. #if    EPSON
  500. #if    HIRES
  501. void    outpaperfeed();
  502. #endif /* HIRES */
  503. #endif /* EPSON */
  504.  
  505. #if    HPJETPLUS
  506. void    outraster();
  507. #endif /* HPJETPLUS */
  508.  
  509. void    outrow();
  510. void    openfont();
  511. void    option();
  512.  
  513. #if    (BBNBITGRAPH | HPJETPLUS | POSTSCRIPT | IMPRESS | CANON_A2)
  514. #else /* NOT (BBNBITGRAPH | HPJETPLUS | POSTSCRIPT | IMPRESS | CANON_A2) */
  515. void    prtbmap();
  516. #endif /* (BBNBITGRAPH | HPJETPLUS | POSTSCRIPT | IMPRESS | CANON_A2) */
  517.  
  518. void    prtpage();
  519.  
  520. #if    POSTSCRIPT
  521. char*    putfontname();
  522. void    putname();
  523. #endif /* POSTSCRIPT */
  524.  
  525. #if    BBNBITGRAPH
  526. void    putout();
  527. #endif /* BBNBITGRAPH */
  528.  
  529. void    readfont();
  530. int    readgf();
  531. int    readpk();
  532. void    readpost();
  533. int    readpxl();
  534. void    reldfont();
  535.  
  536. #if    BBNBITGRAPH
  537. void    rsetterm();
  538. #endif /* BBNBITGRAPH */
  539.  
  540. COORDINATE    rulepxl();
  541. void    setchar();
  542. void    setfntnm();
  543.  
  544. #if    HPJETPLUS
  545. void    setfont();
  546. #endif
  547.  
  548. void    setrule();
  549.  
  550. #if    (HPJETPLUS | POSTSCRIPT | IMPRESS | CANON_A2)
  551. void    setstr();
  552. #endif /* (HPJETPLUS | POSTSCRIPT | IMPRESS | CANON_A2) */
  553.  
  554. INT32    signex();
  555. void    skipfont();
  556. void    skgfspec();
  557. void    skpkspec();
  558. void    special();
  559. char*    tctos();
  560.  
  561. #if    POSTSCRIPT
  562. void    textchr();
  563. void    textflush();
  564. void    textnum();
  565. void    textstr();
  566. #endif /* POSTSCRIPT */
  567.  
  568. #if    BBNBITGRAPH
  569. void    unloadfonts();
  570. #endif
  571.  
  572. void    usage();
  573.  
  574. #if    VIRTUAL_FONTS
  575. void    virtfree();
  576. #endif
  577.  
  578. void    warning();
  579.  
  580. #if    FASTZERO
  581. void    zerom();
  582. #endif /* FASTZERO */
  583.  
  584. #endif /* ANSI_PROTOTYPES */
  585.